﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Xml;
using System.Text;
using System.IO;
using System.Net.Mail;
using System.Net;
using System.Security.Cryptography;
using System.Globalization;
using System.Text.RegularExpressions;
using System.Collections;
/// <summary>
/// Descripción breve de Utility
/// </summary>
public class Utility
{
	public Utility()
	{
		//
		// TODO: Agregar aquí la lógica del constructor
		//
	}

    public static void writeError(string error)
    {
        try
        {
            string ruta = "c:\\TEMP\\megahealth_" + DateTime.Now.Date.Month.ToString() + "_" + DateTime.Now.Date.Day.ToString() + "_" + DateTime.Now.Date.Year.ToString() + ".txt";
            StreamWriter escritor = new StreamWriter(ruta, true);
            escritor.WriteLine(DateTime.Now + " " + error);
            escritor.Close();
        }
        catch (Exception e)
        {

        }

    }

    public static bool isNumeric(string str) {
        bool result = false;


        try {
            int temp = int.Parse(str);
            result = true;
        }
        catch (Exception ex) {
            result = false;
        }


        return result;

    
    }

}